import { Game } from '@/type'
import { invoke } from '@tauri-apps/api/core'

class GameStartManager {
  public async startGame(game: Game) {
    switch (game.openMode) {
      case 'file':
        await invoke('open_file', { path: game.openFilePath })
        break
      case 'cmd':
        await invoke('execute_command', { command: game.openCmd })
    }
  }
}

export default new GameStartManager()
